package com.qipay.mapper;

import com.qipay.baas.model.QipayTradlog;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

@Mapper
public interface QipayTradlogMapper extends com.qipay.baas.mapper.QipayTradlogMapper {


    @Select({
            "select * from qipay_tradlog where create_time >= #{from} and create_time <= #{to}"
    })
    @Results({
            @Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
            @Result(column = "sp_id", property = "spId", jdbcType = JdbcType.BIGINT),
            @Result(column = "channel_type", property = "channelType", jdbcType = JdbcType.TINYINT),
            @Result(column = "sp_fee_recharge", property = "spFeeRecharge", jdbcType = JdbcType.REAL),
            @Result(column = "qipay_amount", property = "qipayAmount", jdbcType = JdbcType.INTEGER),
            @Result(column = "sp_amount", property = "spAmount", jdbcType = JdbcType.INTEGER),
            @Result(column = "trade_no", property = "tradeNo", jdbcType = JdbcType.CHAR),
            @Result(column = "total", property = "total", jdbcType = JdbcType.INTEGER),
            @Result(column = "remark", property = "remark", jdbcType = JdbcType.VARCHAR),
            @Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP)
    })
    List<QipayTradlog> list(@Param("from") String from, @Param("to") String to);
}
